#!/usr/bin/perl -w

use strict;

use IO::Handle;
STDOUT->autoflush(1);

my $msg;
my $nick = "";
while (<>) {
	if (/^msg\s+manatee:?\s+(o\/|\\o)\s*$/) {
		$msg = $1;
	}
	elsif (/^nick\s+(\S+)/) {
		$nick = $1;
	}
}

if (defined $msg) {
	$nick = "$nick:";
	print "send $nick \\o\n" if ($msg eq "o/");
	print "send $nick o/\n" if ($msg eq "\\o");
}
